<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>审核信息显示界面</title>
    <script src="../../res/layui/layui.js"></script>
    <link rel="stylesheet" href="../../res/layui/css/layui.css" type="text/css">
    <script src="../../res/js/Tools.js" charset="utf-8"></script>
    <script src="../../res/js/jquery-3.1.1.min.js" charset="utf-8"></script>
</head>
<body>

<table class="layui-hide" id="demo" lay-filter="test"></table>
<script type="text/html" id="switchTpl3">
    {{# if(d.saName==10){ }}
    通知公告
    {{# } else if(d.saName==20){}}
    公务信息
    {{# } else if(d.saName==40){}}
    学习资料
    {{# } else if(d.saName==30){}}
    文件政策
    {{# } }}
</script>
<script type="text/html" id="switchTpl2">
    {{# if(d.auditState==20){ }}
    <div style="color: green"> 已通过</div>
    {{# } else if(d.auditState==21){}}
    <div style="color: red">未通过</div>
    {{# } }}
</script>
<script>
    var url="../../AtsAttachmentEmpAction/selectAudit?saId="+getQueryString("attachId");
    layui.use(['table','layer'],function(){
        var table=layui.table;
        table.render({
            elem:'#demo'
            ,url:url
            ,title:'审核记录表'
            ,page:true
            ,cols:[[
                {field:'creater',title:'审核人',width:100}
                ,{field:'auExp',title:'审核意见',width:170}
                ,{field:'auTime',title:'审核时间',width:170}
                ,{field:'saName',title:'审核类型',width:100,templet: '#switchTpl3'}
                 ,{field:'auditState',title:'审核状态',width:100,templet: '#switchTpl2'}
            ]]
        })
    })
    </script>
</body>
</html>